# Contributor: Lucas Ramage <ramage.lucas@openmailbox.org>
# Maintainer: Lucas Ramage <ramage.lucas@openmailbox.org>
pkgname=ecl
pkgver=16.1.3
pkgrel=4
pkgdesc="Embeddable Common Lisp"
# not compatible with soft-float archs (like mips)
arch="all !mips !mips64"
url="https://common-lisp.net/project/ecl/"
license="LGPL-2.1-or-later"
makedepends="gmp-dev libffi-dev gc-dev"
source="https://common-lisp.net/project/ecl/static/files/release/ecl-$pkgver.tgz
	fix-build-with-libffi-3.3.patch
	"
subpackages="$pkgname-doc $pkgname-dev"

build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--infodir=/usr/share/info \
		--mandir=/usr/share/man \
		--localstatedir=/var/state/ecl \
		--enable-boehm=system \
		--with-cxx
	make -j1
}

package() {
	make DESTDIR="$pkgdir" install
}
sha512sums="5d743f422f6bc24671abf4c739cde8273d08f056906a1ef8aed5145c703b6d52c7fa4b5e0be8c125f32240c20ce053007786bb3ae81cc34d47791f6fae0819c1  ecl-16.1.3.tgz
c954e79d5409ed7d25df3477686201755d66f3132f2f9121fbc90b8738c7ea176c9cb3184cd100bc51e6af3f30554dec3957be1c0a29de97316b3a9dc4e0f7e4  fix-build-with-libffi-3.3.patch"
